package www.java.Singleton;


class  Singleton {
    private static Singleton singleton = null;

    private Singleton() {
    }


    public static Singleton gettSinglon() {
        if (singleton == null) {
            return singleton = new Singleton ();
        }
        return singleton;
    }

    public void print() {
        System.out.println("a SinglonProject");
    }
}


public class Test{
    public static void main(String[] args) {
        Singleton.gettSinglon().print();


    }
}

